﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using KT.Framework.Web;
using ZhuGe.DAL.SqlServer;

namespace ZhuGe.Web
{
    /// <summary>
    /// index 的摘要说明
    /// </summary>
    public class index : VTemplatePage
    {

        /// <summary>
        /// 初始化页面模板
        /// </summary>
        public override void InitPageTemplate()
        {
            this.LoadCurrentPageTemplate();

            this.Document.SetValue("Lables", SqlHelper.ExecuteDataSet("SELECT * FROM T_Lables", "Lables", null));
            this.Document.SetValue("Blogs", SqlHelper.ExecuteDataSet("SELECT top 3 * FROM T_Blogs ORDER BY CreateTime DESC", "Blogs", null));
        }

        /// <summary>
        /// 站点的配置
        /// </summary>
        public override WebSiteConfiguration Configuration
        {
            get
            {
                return WebSiteConfiguration.From<WebSiteConfiguration>("website.config");
            }
        }
    }
}